import {RouteRecordRaw} from 'vue-router'

export default function (framework: any, meta: any): RouteRecordRaw {
    return {
        name: 'app', path: '/app', component: framework,
        children: (pre => [
            {
                name: `${pre}version`, path: `version/list`, meta: {...meta, title: '应用版本', cache: true},
                component: () => import('@/views/app/version/Version.vue')
            },
            {
                name: `${pre}template`, path: `template/list`, meta: {...meta, title: '应用模板', cache: true},
                component: () => import('@/views/app/template/Template.vue')
            },
            {
                name: `${pre}template-design`, path: `template/design`, meta: {...meta, title: '应用模板-设计', cache: true},
                component: () => import('@/views/app/template/TemplateDesign.vue')
            },
        ])('app-')
    }
}